package com.kexilo.core.audit.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 操作日志记录表 kx_log_operation
 * 
 * @author Kexilo
 */
@TableName("kx_log_operation")
public class SysOperLog implements Serializable {
    
    private static final long serialVersionUID = 1L;

    /** 日志主键 */
    @TableId(type = IdType.AUTO)
    private Long operId;

    /** 操作模块 */
    private String title;

    /** 业务类型（0其它 1新增 2修改 3删除） */
    private Integer businessType;

    /** 业务类型数组 */
    private Integer[] businessTypes;

    /** 请求方法 */
    private String method;

    /** 请求方式 */
    private String requestMethod;

    /** 操作类别（0其它 1后台用户 2手机端用户） */
    private Integer operatorType;

    /** 操作人员 */
    private String operName;

    /** 部门名称 */
    private String deptName;

    /** 请求url */
    private String operUrl;

    /** 操作地址 */
    private String operIp;

    /** 操作地点 */
    private String operLocation;

    /** 请求参数 */
    private String operParam;

    /** 返回参数 */
    private String jsonResult;

    /** 操作状态（0正常 1异常） */
    private Integer status;

    /** 错误消息 */
    private String errorMsg;

    /** 操作时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime operTime;

    /** 消耗时间 */
    private Long costTime;

    /** 链路追踪ID */
    private String traceId;

    /** 跨度ID */
    private String spanId;

    /** 用户代理 */
    private String userAgent;

    /** 设备类型 */
    private String deviceType;

    /** 浏览器类型 */
    private String browser;

    /** 操作系统 */
    private String os;

    /** 租户ID */
    private String tenantId;

    /** 请求大小（字节） */
    private Long requestSize;

    /** 响应大小（字节） */
    private Long responseSize;

    // Getter methods
    public Long getOperId() {
        return operId;
    }

    public String getTitle() {
        return title;
    }

    public Integer getBusinessType() {
        return businessType;
    }

    public Integer[] getBusinessTypes() {
        return businessTypes;
    }

    public String getMethod() {
        return method;
    }

    public String getRequestMethod() {
        return requestMethod;
    }

    public Integer getOperatorType() {
        return operatorType;
    }

    public String getOperName() {
        return operName;
    }

    public String getDeptName() {
        return deptName;
    }

    public String getOperUrl() {
        return operUrl;
    }

    public String getOperIp() {
        return operIp;
    }

    public String getOperLocation() {
        return operLocation;
    }

    public String getOperParam() {
        return operParam;
    }

    public String getJsonResult() {
        return jsonResult;
    }

    public Integer getStatus() {
        return status;
    }

    public String getErrorMsg() {
        return errorMsg;
    }

    public LocalDateTime getOperTime() {
        return operTime;
    }

    public Long getCostTime() {
        return costTime;
    }

    public String getTraceId() {
        return traceId;
    }

    public String getSpanId() {
        return spanId;
    }

    public String getUserAgent() {
        return userAgent;
    }

    public String getDeviceType() {
        return deviceType;
    }

    public String getBrowser() {
        return browser;
    }

    public String getOs() {
        return os;
    }

    public String getTenantId() {
        return tenantId;
    }

    public Long getRequestSize() {
        return requestSize;
    }

    public Long getResponseSize() {
        return responseSize;
    }

    // Setter methods
    public void setOperId(Long operId) {
        this.operId = operId;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public void setBusinessType(Integer businessType) {
        this.businessType = businessType;
    }

    public void setBusinessTypes(Integer[] businessTypes) {
        this.businessTypes = businessTypes;
    }

    public void setMethod(String method) {
        this.method = method;
    }

    public void setRequestMethod(String requestMethod) {
        this.requestMethod = requestMethod;
    }

    public void setOperatorType(Integer operatorType) {
        this.operatorType = operatorType;
    }

    public void setOperName(String operName) {
        this.operName = operName;
    }

    public void setDeptName(String deptName) {
        this.deptName = deptName;
    }

    public void setOperUrl(String operUrl) {
        this.operUrl = operUrl;
    }

    public void setOperIp(String operIp) {
        this.operIp = operIp;
    }

    public void setOperLocation(String operLocation) {
        this.operLocation = operLocation;
    }

    public void setOperParam(String operParam) {
        this.operParam = operParam;
    }

    public void setJsonResult(String jsonResult) {
        this.jsonResult = jsonResult;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public void setErrorMsg(String errorMsg) {
        this.errorMsg = errorMsg;
    }

    public void setOperTime(LocalDateTime operTime) {
        this.operTime = operTime;
    }

    public void setCostTime(Long costTime) {
        this.costTime = costTime;
    }

    public void setTraceId(String traceId) {
        this.traceId = traceId;
    }

    public void setSpanId(String spanId) {
        this.spanId = spanId;
    }

    public void setUserAgent(String userAgent) {
        this.userAgent = userAgent;
    }

    public void setDeviceType(String deviceType) {
        this.deviceType = deviceType;
    }

    public void setBrowser(String browser) {
        this.browser = browser;
    }

    public void setOs(String os) {
        this.os = os;
    }

    public void setTenantId(String tenantId) {
        this.tenantId = tenantId;
    }

    public void setRequestSize(Long requestSize) {
        this.requestSize = requestSize;
    }

    public void setResponseSize(Long responseSize) {
        this.responseSize = responseSize;
    }
}
